﻿using System.ServiceModel;
using System.Runtime.Serialization;
using System.Collections.Generic;
[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(ICallback))]
public interface IService
{
    /*
    [OperationContract]
    User Login(string id, string password);

    [OperationContract]
    bool Join(string id, string password, string nickname);

    [OperationContract]
    void CreateRoom(int no,string title);

    [OperationContract]
    bool JoinRoom(int no);

    [OperationContract]
    void QuitRoom();
    */
    [OperationContract(IsInitiating=true,IsOneWay=true,IsTerminating=false)]
    void Start();//처음 시작하여 세션을 엽니다.

    [OperationContract(IsInitiating=false,IsOneWay=false,IsTerminating=false)]
    User[] Login(string id);

    [OperationContract]
    void InitGame();//초기화를 합니다.

    [OperationContract]
    bool RollDice();//주사위를 던집니다. 따블이면 true, 한번 더 함

    [OperationContract]
    void Buy(); //땅과 숙박시설을 산다.

    [OperationContract]
    void Sell();//땅과 숙발시설을 판다.

    [OperationContract(IsOneWay = true)]
    void Display();//정보를 표시하기 위해 갱신함.

    [OperationContract(IsOneWay=true,IsInitiating=false,IsTerminating=true)]
    void Quit();
}

public interface ICallback
{
    [OperationContract(IsOneWay = true)]
    void CallBackError(string message);
    [OperationContract(IsOneWay = true)]
    void CallBackMessage(string message);
}
